package BasicCmIRPSystem;


/**
 * Generated from IDL interface "ModifyResultIterator".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public abstract class ModifyResultIteratorPOA
	extends org.omg.PortableServer.Servant
	implements org.omg.CORBA.portable.InvokeHandler, BasicCmIRPSystem.ModifyResultIteratorOperations
{
	static private final java.util.Hashtable m_opsHash = new java.util.Hashtable();
	static
	{
		m_opsHash.put ( "next_basic_cm_informations", new java.lang.Integer(0));
		m_opsHash.put ( "next_modification_errors", new java.lang.Integer(1));
		m_opsHash.put ( "destroy", new java.lang.Integer(2));
	}
	private String[] ids = {"IDL:BasicCmIRPSystem/ModifyResultIterator:1.0","IDL:BasicCmIRPSystem/BasicCmInformationIterator:1.0"};
	public BasicCmIRPSystem.ModifyResultIterator _this()
	{
		return BasicCmIRPSystem.ModifyResultIteratorHelper.narrow(_this_object());
	}
	public BasicCmIRPSystem.ModifyResultIterator _this(org.omg.CORBA.ORB orb)
	{
		return BasicCmIRPSystem.ModifyResultIteratorHelper.narrow(_this_object(orb));
	}
	public org.omg.CORBA.portable.OutputStream _invoke(String method, org.omg.CORBA.portable.InputStream _input, org.omg.CORBA.portable.ResponseHandler handler)
		throws org.omg.CORBA.SystemException
	{
		org.omg.CORBA.portable.OutputStream _out = null;
		// do something
		// quick lookup of operation
		java.lang.Integer opsIndex = (java.lang.Integer)m_opsHash.get ( method );
		if ( null == opsIndex )
			throw new org.omg.CORBA.BAD_OPERATION(method + " not found");
		switch ( opsIndex.intValue() )
		{
			case 0: // next_basic_cm_informations
			{
			try
			{
				short _arg0=_input.read_ushort();
				BasicCmIRPConstDefs.ResultSetHolder _arg1= new BasicCmIRPConstDefs.ResultSetHolder();
				_out = handler.createReply();
				_out.write_boolean(next_basic_cm_informations(_arg0,_arg1));
				BasicCmIRPConstDefs.ResultSetHelper.write(_out,_arg1.value);
			}
			catch(BasicCmIRPSystem.NextBasicCmInformations _ex0)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.NextBasicCmInformationsHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex1);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex2)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex2);
			}
				break;
			}
			case 1: // next_modification_errors
			{
			try
			{
				short _arg0=_input.read_ushort();
				BasicCmIRPConstDefs.ModifyAttributeErrorsSeqHolder _arg1= new BasicCmIRPConstDefs.ModifyAttributeErrorsSeqHolder();
				_out = handler.createReply();
				_out.write_boolean(next_modification_errors(_arg0,_arg1));
				BasicCmIRPConstDefs.ModifyAttributeErrorsSeqHelper.write(_out,_arg1.value);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(BasicCmIRPSystem.NextModifyErrors _ex1)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.NextModifyErrorsHelper.write(_out, _ex1);
			}
				break;
			}
			case 2: // destroy
			{
			try
			{
				_out = handler.createReply();
				destroy();
			}
			catch(BasicCmIRPSystem.DestroyException _ex0)
			{
				_out = handler.createExceptionReply();
				BasicCmIRPSystem.DestroyExceptionHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
				break;
			}
		}
		return _out;
	}

	public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] obj_id)
	{
		return ids;
	}
}
